﻿using System;
using System.Data;
using Com.Iooogle.Bms.Entities;

namespace Com.Iooogle.Bms.Business
{
	/// <summary>
	/// 业务处理基本接口。
	/// </summary>
	public interface IBmsBusiness
	{
		/// <summary>
		/// 添加记录。
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		Object Create(IDataEntity entity);

		/// <summary>
		/// 更新记录。
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		Int32 Update(IDataEntity entity);

		/// <summary>
		/// 删除记录。
		/// </summary>
		/// <param name="key"></param>
		void Delete(Object key);

		/// <summary>
		/// 返回全部记录。
		/// </summary>
		/// <returns></returns>
		DataSet GetAll();

		/// <summary>
		/// 返回一行记录。
		/// </summary>
		/// <param name="key"></param>
		/// <returns></returns>
		IDataEntity GetRow(Object key);

		/// <summary>
		/// 返回数据总数。
		/// </summary>
		/// <param name="key"></param>
		/// <returns></returns>
		Int32 GetCount();
	}
}
